Bytecode instructions

# do nothing
0x00                              NOP

# moving data between registers, heap and stack
0x01 0xR1 0xR2                    MOV R1, R2
0x02 0xR1 0xHH                    MOV R1, heap[HH]
0x03 0xHH 0xR1                    MOV heap[HH], R1
0x04 0xR1 0xSS                    MOV R1, stack[SS]
0x05 0xSS 0xR1                    MOV stack[SS], R1

# working with the stack
0x06 0xR1                         PUSH R1
0x07 0xHH                         PUSH heap[HH]
0x08 0xSS                         PUSH stack[SS]
0x09 0xR1                         POP R1
0x0A 0xSN                         GROW 0xSN

# jumps
0x0B 0xSN                         JMP 0xSN
0x0C 0xSN 0xMM                    JMP 0xSNMM

# allocating objects
0x0D                              MOV reg[0], nil
0x0E                              MOV reg[0], #f
0x0F                              MOV reg[0], #t
0x0G 0xAA 0xBB 0xCC 0xDD          MOV reg[0], 0xAABBCCDD
0x0H 0xR1 0xR2                    MOV reg[0], cons(R1, R2)

# exit
0xFE                              EXIT FAIL
0xFF                              EXIT OK

